#!/usr/bin/python3
import sys
import string
import statistics

vollist=[]

filename=sys.argv[1]
f = open(filename, 'r')
voltagesum=0

while 1:
	line = f.readline()
	if not line:
		break
	voltage = line.split()[2].split('=')[1]
	vollist.append(int(voltage))
#	voltagesum+=int(voltage)

f.close()

#print(vollist)
#print("Average:%d" %statistics.mean(vollist))

for i in range(1,3):
	maxvol=max(vollist)
	minvol=min(vollist)
#	print(maxvol,minvol)
	vollist.remove(maxvol)
	vollist.remove(minvol)

#print("After remove:\n", vollist)
print("Average:%dmV" %statistics.mean(vollist))

